\(\int \frac {a+b \log (c x^n)}{1-e x^2} \, dx\) [246]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (verified)
   Fricas [F]
   Sympy [F]
   Maxima [F(-2)]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 21, antiderivative size = 66 \[ \int \frac {a+b \log \left (c x^n\right )}{1-e x^2} \, dx=\frac {\text {arctanh}\left (\sqrt {e} x\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {e}}+\frac {b n \operatorname {PolyLog}\left (2,-\sqrt {e} x\right )}{2 \sqrt {e}}-\frac {b n \operatorname {PolyLog}\left (2,\sqrt {e} x\right )}{2 \sqrt {e}} \]

[Out]

arctanh(x*e^(1/2))*(a+b*ln(c*x^n))/e^(1/2)+1/2*b*n*polylog(2,-x*e^(1/2))/e^(1/2)-1/2*b*n*polylog(2,x*e^(1/2))/
e^(1/2)

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {212, 2361, 12, 6031} \[ \int \frac {a+b \log \left (c x^n\right )}{1-e x^2} \, dx=\frac {\text {arctanh}\left (\sqrt {e} x\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {e}}+\frac {b n \operatorname {PolyLog}\left (2,-\sqrt {e} x\right )}{2 \sqrt {e}}-\frac {b n \operatorname {PolyLog}\left (2,\sqrt {e} x\right )}{2 \sqrt {e}} \]

[In]

Int[(a + b*Log[c*x^n])/(1 - e*x^2),x]

[Out]

(ArcTanh[Sqrt[e]*x]*(a + b*Log[c*x^n]))/Sqrt[e] + (b*n*PolyLog[2, -(Sqrt[e]*x)])/(2*Sqrt[e]) - (b*n*PolyLog[2,
 Sqrt[e]*x])/(2*Sqrt[e])

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 2361

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/((d_) + (e_.)*(x_)^2), x_Symbol] :> With[{u = IntHide[1/(d + e*x^2),
 x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[u/x, x], x]] /; FreeQ[{a, b, c, d, e, n}, x]

Rule 6031

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (-Simp[(b/2)*PolyLog[2, (-c)*x]
, x] + Simp[(b/2)*PolyLog[2, c*x], x]) /; FreeQ[{a, b, c}, x]

Rubi steps \begin{align*} \text {integral}& = \frac {\tanh ^{-1}\left (\sqrt {e} x\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {e}}-(b n) \int \frac {\tanh ^{-1}\left (\sqrt {e} x\right )}{\sqrt {e} x} \, dx \\ & = \frac {\tanh ^{-1}\left (\sqrt {e} x\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {e}}-\frac {(b n) \int \frac {\tanh ^{-1}\left (\sqrt {e} x\right )}{x} \, dx}{\sqrt {e}} \\ & = \frac {\tanh ^{-1}\left (\sqrt {e} x\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt {e}}+\frac {b n \text {Li}_2\left (-\sqrt {e} x\right )}{2 \sqrt {e}}-\frac {b n \text {Li}_2\left (\sqrt {e} x\right )}{2 \sqrt {e}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.09 \[ \int \frac {a+b \log \left (c x^n\right )}{1-e x^2} \, dx=\frac {-\left (\left (a+b \log \left (c x^n\right )\right ) \left (\log \left (1-\sqrt {e} x\right )-\log \left (1+\sqrt {e} x\right )\right )\right )+b n \operatorname {PolyLog}\left (2,-\sqrt {e} x\right )-b n \operatorname {PolyLog}\left (2,\sqrt {e} x\right )}{2 \sqrt {e}} \]

[In]

Integrate[(a + b*Log[c*x^n])/(1 - e*x^2),x]

[Out]

(-((a + b*Log[c*x^n])*(Log[1 - Sqrt[e]*x] - Log[1 + Sqrt[e]*x])) + b*n*PolyLog[2, -(Sqrt[e]*x)] - b*n*PolyLog[
2, Sqrt[e]*x])/(2*Sqrt[e])

Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 0.68 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.83

method result size
meijerg \(\frac {a \,\operatorname {arctanh}\left (x \sqrt {e}\right )}{\sqrt {e}}+\frac {b \ln \left (c \right ) \operatorname {arctanh}\left (x \sqrt {e}\right )}{\sqrt {e}}+\left (\frac {b n \ln \left (x \right ) \Phi \left (e \,x^{2}, 1, \frac {1}{2}\right )}{2}-\frac {b n \Phi \left (e \,x^{2}, 2, \frac {1}{2}\right )}{4}\right ) x\) \(55\)
risch \(-\frac {\left (\frac {i b \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )}{2}-\frac {i b \pi \,\operatorname {csgn}\left (i c \right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{2}-\frac {i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{2}+\frac {i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}}{2}-b \ln \left (c \right )-a \right ) \operatorname {arctanh}\left (x \sqrt {e}\right )}{\sqrt {e}}-\frac {b \,\operatorname {arctanh}\left (x \sqrt {e}\right ) n \ln \left (x \right )}{\sqrt {e}}+\frac {b \,\operatorname {arctanh}\left (x \sqrt {e}\right ) \ln \left (x^{n}\right )}{\sqrt {e}}-\frac {b n \ln \left (x \right ) \ln \left (1-x \sqrt {e}\right )}{2 \sqrt {e}}+\frac {b n \ln \left (x \right ) \ln \left (x \sqrt {e}+1\right )}{2 \sqrt {e}}-\frac {b n \operatorname {dilog}\left (1-x \sqrt {e}\right )}{2 \sqrt {e}}+\frac {b n \operatorname {dilog}\left (x \sqrt {e}+1\right )}{2 \sqrt {e}}\) \(200\)

[In]

int((a+b*ln(c*x^n))/(-e*x^2+1),x,method=_RETURNVERBOSE)

[Out]

a/e^(1/2)*arctanh(x*e^(1/2))+b*ln(c)/e^(1/2)*arctanh(x*e^(1/2))+(1/2*b*n*ln(x)*LerchPhi(e*x^2,1,1/2)-1/4*b*n*L
erchPhi(e*x^2,2,1/2))*x

Fricas [F]

\[ \int \frac {a+b \log \left (c x^n\right )}{1-e x^2} \, dx=\int { -\frac {b \log \left (c x^{n}\right ) + a}{e x^{2} - 1} \,d x } \]

[In]

integrate((a+b*log(c*x^n))/(-e*x^2+1),x, algorithm="fricas")

[Out]

integral(-(b*log(c*x^n) + a)/(e*x^2 - 1), x)

Sympy [F]

\[ \int \frac {a+b \log \left (c x^n\right )}{1-e x^2} \, dx=- \int \frac {a}{e x^{2} - 1}\, dx - \int \frac {b \log {\left (c x^{n} \right )}}{e x^{2} - 1}\, dx \]

[In]

integrate((a+b*ln(c*x**n))/(-e*x**2+1),x)

[Out]

-Integral(a/(e*x**2 - 1), x) - Integral(b*log(c*x**n)/(e*x**2 - 1), x)

Maxima [F(-2)]

Exception generated. \[ \int \frac {a+b \log \left (c x^n\right )}{1-e x^2} \, dx=\text {Exception raised: ValueError} \]

[In]

integrate((a+b*log(c*x^n))/(-e*x^2+1),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(e>0)', see `assume?` for more
details)Is e

Giac [F]

\[ \int \frac {a+b \log \left (c x^n\right )}{1-e x^2} \, dx=\int { -\frac {b \log \left (c x^{n}\right ) + a}{e x^{2} - 1} \,d x } \]

[In]

integrate((a+b*log(c*x^n))/(-e*x^2+1),x, algorithm="giac")

[Out]

integrate(-(b*log(c*x^n) + a)/(e*x^2 - 1), x)

Mupad [F(-1)]

Timed out. \[ \int \frac {a+b \log \left (c x^n\right )}{1-e x^2} \, dx=\int -\frac {a+b\,\ln \left (c\,x^n\right )}{e\,x^2-1} \,d x \]

[In]

int(-(a + b*log(c*x^n))/(e*x^2 - 1),x)

[Out]

int(-(a + b*log(c*x^n))/(e*x^2 - 1), x)